home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 050 / copyrite.pqs / copyrite.pas
Encoding:
Pascal/Delphi Source File  |  1987-04-11  |  1.9 KB  |  66 lines

  1. Program CopyRight;
  2.  
  3.   { This program allows you to insert your personal CopyRight notice }
  4.   { into a Turbo Pascal .COM, .CHN, or overlay file (.00?).          }
  5.   { It overwrites the Borland CopyRight notice.                      }
  6.   { This program has only been tested on an MSDOS machine with       }
  7.   { Turbo Pascal version 3.0. Thus, we are actually editing an       }
  8.   { object code file. Have fun with it. Regards - Wm. Mabee, CRNA    }
  9.  
  10. Const
  11.   { Fill note with the notice you wish to use. If your notice does  }
  12.   { not completly fill 'Note' complete the line with spaces.        }
  13.  
  14.   (*     '                                                                                                    ' *)
  15.  
  16.   Note = 'Copyright (C.) 1987 John Q. Public (***) ***-****                                                   ';
  17.  
  18. Var
  19.  
  20.   TestChar : Char;
  21.   FileName : String[14];
  22.   FileVar  : File Of Char;
  23.   I        : Integer;
  24.   WriteStr : String[100];
  25.  
  26. Begin
  27.  
  28.   WriteStr := Note;
  29.  
  30.   ClrScr;
  31.   GotoXY(1,1);
  32.   WriteLn('This program writes my CopyRight notice into a Turbo Pascal');
  33.   WriteLn('program. To exit enter a null string when prompted for name');
  34.   WriteLn('of the Turbo Pascal file to process.');
  35.  
  36.   Gotoxy(1,4);
  37.   Write('Enter Name Of File : ');
  38.   ReadLn(FileName);
  39.  
  40.   While FileName <> '' Do
  41.   Begin
  42.  
  43.     Assign(FileVar,FileName);
  44.     Reset(FileVar);
  45.  
  46.     { Advance pointer to the address of Borland CopyRight. }
  47.  
  48.     For I := 1 To 7 Do Read(FileVar,TestChar);
  49.  
  50.     { Write in new copyright notice. Use a string length of 100 bytes to  }
  51.     { remove Borland's notice and info regarding type of monitor that was }
  52.     { used when the program was first compiled.                           }
  53.  
  54.     For I := 1 To 100 Do Write(FileVar,WriteStr[I]);
  55.  
  56.     Close(FileVar);
  57.  
  58.     GotoXY(1,4);
  59.     Write('Enter Name Of File : ');
  60.     GotoXY(22,4);
  61.     ClrEol;
  62.     ReadLn(FileName);
  63.  
  64.   End;
  65.  
  66. End.